# Opdracht 2.3 CSV schrijven

import csv
import random

f = open('oplopendCijfer.csv','wt')
try:
    writer = csv.writer(f,lineterminator='\n')
    writer.writerow(('Nummer','Random getal'))
    for i in range(100):
        writer.writerow(((i+1),random.randint(0,10000)))
finally:
    f.close()

print(open('oplopendCijfer.csv','rt').read())